CPATH=`pwd`
DESTFILE='./crontab_task.conf'

rm -f ${DESTFILE}

echo '# 每隔 30s 同步执行一次' >> ${DESTFILE}
echo "*/1 * * * * cd ${CPATH} && /usr/bin/python ./auto_sync_to_git.py -c" >> ${DESTFILE}
echo "* * * * * sleep 30 && cd ${CPATH} && /usr/bin/python ./auto_sync_to_git.py -c" >> ${DESTFILE}

echo >> ${DESTFILE}
echo >> ${DESTFILE}
echo >> ${DESTFILE}

echo "# 每 10m push 一次" >> ${DESTFILE}
echo "*/10 * * * * cd ${CPATH} && /usr/bin/python ./auto_sync_to_git.py -p" >> ${DESTFILE}